<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div id="dialog-login" title="登录" style="background:white;width:400px">
  <div id="login">
    <div id="dialog-popup" class="login-box">
      <s:form action="login" id="login-form" namespace="/" theme="simple" validate="true">
        <div class="field email">
          <label for="username_or_email">用户名</label>
          <s:textfield id="username_or_email" size="true" name="username" cssClass="f-input"/>
          <s:fielderror cssClass="field-error">
            <s:param>username</s:param>
          </s:fielderror>
          <span class="hint">Email地址或者用户名都可正常登录</span>
        </div>
        <div class="field password">
          <label for="password">密码</label>
          <s:password id="password" name="password" cssClass="f-input" maxlength="20"
                      required="true"/>
          <s:fielderror cssClass="field-error">
            <s:param>password</s:param>
          </s:fielderror>
					<span class="lostpassword">
						<a href="#">忘记密码？</a>
					</span>
        </div>
        <div class="field validationCode">
          <label>验证码</label>
          <s:textfield id="txtValidationCode" name="validation" cssClass="tf-input"
                       maxlength="4" required="true"/>
          &nbsp;&nbsp;
          <img id="validation_image" src="/validationCode.action" style="height:30px;vertical-align:middle"
               onclick="this.src='/validationCode?a=' + Math.random()" alt="验证码无法显示"/>
          <s:fielderror cssClass="field-error">
            <s:param>validation</s:param>
          </s:fielderror>
        </div>
        <s:submit value="登录" name="commit" id="submit" cssClass="formsubmit"/>
      </s:form>
    </div>
  </div>
</div>